package e.odbo.data.sample.tableid;

import e.odbo.data.bean.BaseBean;

public class TableIdGenerator extends BaseBean<String> {

//private static final long serialVersionUID =4545349176938554200L;

    public final static String ID = "ID";
    public final static String NEXT_ID_INT = "NEXT_ID_INT";
    public final static String NEXT_ID_LONG = "NEXT_ID_LONG";

    protected String id;
    protected Integer nextIdInt=1;
    protected Long nextIdLong=1l;

    public TableIdGenerator() {
        super();
    }

    public TableIdGenerator(String id){
        this.id=id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getNextIdInt() {
        return nextIdInt;
    }

    public void setNextIdInt(Integer nextIdInt) {
        this.nextIdInt = nextIdInt;
    }

    public Long getNextIdLong() {
        return nextIdLong;
    }

    public void setNextIdLong(Long nextIdLong) {
        this.nextIdLong = nextIdLong;
    }

    @Override
    public String getKey() {
        return id;
    }

    public void setKey(String id) {
        this.id = id;
    }


    public String toString() {
        return "id=" + id
                + ",nextIdInt=" + nextIdInt
                + ",nextIdLong=" + nextIdLong;
    }
}